<template>
  <div>
    <el-card shadow="hover" class="images-item">
      <img :src="data.url" alt>
      <div class="desc">{{ data.desc }}</div>
      <div class="bottom">
        <div class="price">
          <span class="symbol">¥</span>
          <span class="number">{{ data.price }}</span>
          <span>起</span>
        </div>
        <div class="city">{{ data.city }}出发</div>
      </div>
    </el-card>
  </div>
</template>

<script lang="ts" src="./image-show.ts" />

<style lang="less" scoped>
.images-item {
  cursor: pointer;
  width: 95%;
  /deep/ .el-card__body {
    padding: 0;
  }
  img {
    width: 100%;
    height: 160px;
  }
  .desc {
    padding: 10px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 30px;
  }
  .bottom {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .price {
      .symbol {
        font-size: 12px;
        color: #f66;
      }
      .number {
        font-size: 20px;
        color: #f66;
      }
    }
    .city {
      font-size: 13px;
      color: #999999;
    }
  }
  &:hover {
    transform: translateY(-5px);
  }
}
</style>
